1. Field of the Invention
The present invention relates to an information processing technique of controlling access to a printing apparatus by an information processing apparatus capable of communicating with the printing apparatus.
2. Description of the Related Art
To meet the demand for electric power saving, recent printing apparatuses have an electric power saving mode in which the electric power consumption is reduced by stopping some functions when determining that the printing apparatus has been standing still for a long time, in addition to an operating mode in which the printing apparatus executes a print operation. When a host computer accesses a printing apparatus in the electric power saving mode, the printing apparatus changes from the electric power saving mode to the operating mode to resume stopped functions and respond to a request from the host computer.
For example, Japanese Patent Laid-Open No. 2001-180083 discloses a printing apparatus capable of controlling the printing apparatus main body and also the CPU and RAM associated with communication control with a host computer or the like to shift to the electric power saving mode.
FIG. 14 is a timing chart showing the relationship between the shift of a conventional printing apparatus to the operating mode and the process of an application. The upper side of the abscissa axis indicating the lapse of time t represents the status shift timing of the printing apparatus, and the lower side represents the timing of the application process. The application performs process 1 (e.g., an inquiry about the amount of remaining sheets to the printing apparatus, or a print instruction) during the interval between time t0 and time t1.
While running in the first operating mode, the printing apparatus replies to an inquiry or instruction from the application (response 1). From time t1 when the application completes process 1, the application does not access the printing apparatus until the next process.
Since the printing apparatus is not accessed, it enters the electric power saving mode (sleep mode) serving as the second operating mode at time ta after a predetermined period through an idle state in which the printing apparatus does nothing.
Upon the lapse of a predetermined polling period TT of the application, the application performs process 2 from time t2 to time t3. Upon access from the application, the printing apparatus shifts from the sleep mode to the normal operating mode, and replies to a request from the application (response 2).
At this time, no problem occurs when the polling period TT is sufficiently long (e.g., 5 h). However, if the host computer frequently accesses the printing apparatus in the electric power saving mode, the printing apparatus shifts from the electric power saving mode to the operating mode, failing to reduce electric power consumption. For example, when the printing apparatus and its hard disk shift to the sleep mode once at time ta and then the hard disk starts up, this shortens the service life of the hard disk. Frequent OFF/ON operation shortens the service life of the hard disk. To prevent this, the hard disk must remain ON for a predetermined time after the hard disk in the sleep mode (OFF) shifts to the operating mode (ON). That is, electric power necessary to operate the hard disk must be supplied for a predetermined time, and the hard disk cannot shift to the sleep mode during this period. To ensure the electric power saving state of the printing apparatus, communication may be cut off to completely inhibit access from the host computer to the printing apparatus for a while. In this case, however, the host computer cannot acquire necessary information about the printing apparatus, impairing the functions of the system made up of the host computer and printing apparatus.